package cmd.commands;

import model.feature.FeatureDefinition;

public class DeleteFeatureIDCommand extends Command {
	public DeleteFeatureIDCommand(Command c) {
		super(c.command, c.parameters);
	}

	@Override
	public boolean execute() {
		int[] deleteList = this.getIntegerParameterList();
		if (deleteList == null) {
			return false;
		}
		
		if(deleteList.length <= 0)
			return false;
		
		System.out.println("Executing command to delete");
		
		FeatureDefinition obj = FeatureDefinition.getInstance();
		obj.deleteDefinitionByID(deleteList);
		return true;
	}
	
	public static void main(String[] args) {
		FeatureDefinition obj = FeatureDefinition.getInstance();
		
		int[] idlist = {14};
		
		obj.deleteDefinitionByID(idlist);
	}
}
